package dao.mysql;

import dao.AppliedDataDAO;
import dao.CalculateDAO;
import dao.CompensationLeaveDAO;
import dao.CompensationLeaveDAO1;
import dao.DAOFactory;
import dao.DetailDAO;
import dao.HolidayCalendarDAO;
import dao.LeaveDAO;
import dao.LeaveDAO1;
import dao.LeaveTypeDAO;
import dao.PositionDAO;
import dao.UserDAO;


public class DAOFactoryImpl extends DAOFactory {
	UserDAO userDAO;
	PositionDAO positionDAO;
	LeaveDAO leaveDAO;
	LeaveDAO1 leaveDAO1;
	LeaveTypeDAO leaveTypeDAO;
	CompensationLeaveDAO compensationLeaveDAO;
	CompensationLeaveDAO1 compensationLeaveDAO1;
	HolidayCalendarDAO holidayCalendarDAO;
	AppliedDataDAO applieddataDAO;
	CalculateDAO calculateDAO;
	DetailDAO detailDAO;
	
    public UserDAO getUserDAO() {
    	if(userDAO == null){
    		userDAO = new UserDAOImpl();
    	}
        return userDAO;
    }

	@Override
	public PositionDAO getPositionDAO() {
		// TODO Auto-generated method stub
		if(positionDAO == null){
			positionDAO = new PositionDAOImpl();
    	}
        return positionDAO;
	}

	@Override
	public LeaveDAO getLeaveDAO() {
		// TODO Auto-generated method stub
		if(leaveDAO == null){
			leaveDAO = new LeaveDAOImpl();
    	}
        return leaveDAO;
	}

	@Override
	public LeaveTypeDAO getLeaveTypeDAO() {
		// TODO Auto-generated method stub
		if(leaveTypeDAO == null){
			leaveTypeDAO = new LeaveTypeDAOImpl();
    	}
        return leaveTypeDAO;
	}

	@Override
	public CompensationLeaveDAO getCompensationLeaveDAO() {
		// TODO Auto-generated method stub
		if(compensationLeaveDAO == null){
			compensationLeaveDAO = new CompensationLeaveDAOImpl();
    	}
        return compensationLeaveDAO;
	}

	@Override
	public HolidayCalendarDAO getHolidayCalendarDAO() {
		// TODO Auto-generated method stub
		if(holidayCalendarDAO == null){
			holidayCalendarDAO = new HolidayCalendarDAOImpl();
    	}
        return holidayCalendarDAO;
	}

	@Override
	public LeaveDAO1 getLeaveDAO1() {
		// TODO Auto-generated method stub
		if(leaveDAO1 == null){
			leaveDAO1= new LeaveDAOImpl1();
    	}
        return leaveDAO1;
	}

	@Override
	public AppliedDataDAO getAppliedDataDAO() {
		// TODO Auto-generated method stub
		if(applieddataDAO == null){
			applieddataDAO = new AppliedDataDAOImpl();
    	}
        return applieddataDAO;
	}

	@Override
	public CalculateDAO getCalculateDAO() {
		// TODO Auto-generated method stub
		if(calculateDAO == null){
			calculateDAO = new CalculateDAOImpl();
    	}
        return calculateDAO;
	}

	@Override
	public DetailDAO getDetailDAO() {
		// TODO Auto-generated method stub
		if(detailDAO == null){
			detailDAO = new DetailDAOImpl();
    	}
        return detailDAO;
	}

	public CompensationLeaveDAO1 getCompensationLeaveDAO1()
	{
		if(compensationLeaveDAO1==null)
		{
			compensationLeaveDAO1=new CompensationLeaveDAOImpl1();
		}
		return compensationLeaveDAO1;
	}
    
    
}
